package com.cqie.hospitalescort.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.cqie.hospitalescort.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单信息
 * </p>
 *
 * @author gdy
 * @since 2025-02-18
 */
@Getter
@Setter
@TableName("med_order")
@ApiModel(value = "MedOrder对象", description = "订单信息")
public class MedOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单编号")
    private String orderCode;

    @ApiModelProperty("患者id")
    private Long userId;

    @ApiModelProperty("陪诊人id")
    private Long escortId;

    @ApiModelProperty("类别id")
    private Long typeId;

    @ApiModelProperty("就诊人id")
    private Long patientInfoId;

    @ApiModelProperty("陪诊开始时间")
    @JsonFormat(pattern = DateUtil.DEFAULT_FORMAT)
    private Date orderStartTime;

    @ApiModelProperty("陪诊结束时间")
    @JsonFormat(pattern = DateUtil.DEFAULT_FORMAT)
    private Date orderEndTime;

    @ApiModelProperty("交易金额")
    private BigDecimal orderPrice;

    @ApiModelProperty("延续订单金额")
    private BigDecimal extendedPrice;

    @ApiModelProperty("满意度")
    private Integer satisfactionLevel;

    @ApiModelProperty("状态(1-预约中，2-预约成功，3-陪诊中，4-已完成，5-已延续，6-已取消)")
    private Integer orderStatus;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("1-删除")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty("删除时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;

    @ApiModelProperty("需求")
    private String demand;

    @ApiModelProperty("陪诊接送地址")
    private String receiveAddress;

    @ApiModelProperty("陪诊接送电话")
    private String tel;

    @ApiModelProperty("医院id")
    private String hospitalId;

    @ApiModelProperty("医院名称")
    private String hospitalName;

    @ApiModelProperty("代跑取药地址")
    private String address;

    @ApiModelProperty("就诊人信息")
    private String client;


}
